home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / BC++ Builder / DATA.Z / CSDEMOS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-10  |  2.4 KB  |  59 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //  CSDEMOS
  6. //  Interbase Client Example
  7. //
  8. //  To run this app you need to create a BDE alias as follows,
  9. //
  10. //    1. Be sure Local Interbase and SQL Links are installed
  11. //    2. Run the BDE Configuration utility, BDECFG32.EXE
  12. //    3. Create a new Alias by the name 'IBLOCAL' of type INTRBASE
  13. //    4. Set the Server Name to <Interbase path>\EXAMPLES\EMPLOYEE.GDB
  14. //
  15. //---------------------------------------------------------------------------
  16. #include <vcl\vcl.h>
  17. #pragma hdrstop
  18. //---------------------------------------------------------------------------
  19. USEDATAMODULE("DMCSDEMO.CPP", DmEmployee);
  20. USEFORM("FRMEXESP.CPP", FrmExecProc);
  21. USEFORM("FRMMAIN.CPP", FrmLauncher);
  22. USEFORM("FRMQRYSP.CPP", FrmQueryProc);
  23. USEFORM("FRMTRANS.CPP", FrmTransDemo);
  24. USEFORM("FRMTRIGG.CPP", FrmTriggerDemo);
  25. USEFORM("FRMVIEWS.CPP", FrmViewDemo);
  26. USERES("csdemos.res");
  27. //---------------------------------------------------------------------
  28. WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
  29. {
  30.   char buf[512];
  31.   try{
  32.     Application->Initialize();
  33.     Application->CreateForm(__classid(TFrmLauncher), &FrmLauncher);
  34.     Application->CreateForm(__classid(TFrmExecProc), &FrmExecProc);
  35.     Application->CreateForm(__classid(TFrmQueryProc), &FrmQueryProc);
  36.     Application->CreateForm(__classid(TFrmTransDemo), &FrmTransDemo);
  37.     Application->CreateForm(__classid(TFrmTriggerDemo), &FrmTriggerDemo);
  38.     Application->CreateForm(__classid(TFrmViewDemo), &FrmViewDemo);
  39.     Application->CreateForm(__classid(TDmEmployee), &DmEmployee);
  40.     Application->Run();
  41.   }
  42.   catch(EDatabaseError& e){
  43.     sprintf(buf,
  44.            "%s\n\n"
  45.            "1. Be sure Local Interbase and SQL Links are installed.\n"
  46.            "2. Run the BDE Configuration utility, BDECFG32.EXE.\n"
  47.            "3. Create a new Alias by the name 'IBLOCAL' of type INTRBASE.\n"
  48.            "4. Set the Server Name to <Interbase path>\\EXAMPLES\\EMPLOYEE.GDB.\n",
  49.            e.Message.c_str());
  50.  
  51.     ShowMessage(buf);
  52.   }
  53.   catch(Exception& e){
  54.     ShowMessage(e.Message);
  55.   }
  56.     return 0;
  57. }
  58. //---------------------------------------------------------------------------
  59.